package com.basic.backend.controller;

import com.basic.backend.common.BaseResponse;
import com.basic.backend.common.ResultUtils;
import com.basic.backend.model.vo.IndexStatisticsVO;
import com.basic.backend.service.IndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping(value = "/index/")
@RestController
@Api(tags = "首页统计")
public class IndexController {
    @Resource
    private IndexService indexService;

    @GetMapping("/statistics")
    @ApiOperation("获取系统统计信息")
    public BaseResponse<IndexStatisticsVO> getStatistics() {
        return ResultUtils.success(indexService.getSystemStatistics(),"");
    }
}
